package demo4.controller;

import demo4.mapper.impl.IUserMapper;
import demo4.util.DBUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * controller控制器
 * 这个层级的类负责和用户打交道,并将请求将来交给业务层处理,并结合处理结果反馈给用户
 */
@Component
public class UserController {
    @Autowired
    private IUserMapper userMapper;

    public void start(){
        System.out.println("UserController:开始处理用户请求");
        System.out.println("UserController:开始处理注册");
        System.out.println("UserController:获取用户信息");
        userMapper.insert(null);
        System.out.println("UserController:注册成功");
    }


}
